import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'

//首页统计
const getBuyAndSaleStatistics = params => getAction('/depotHead/getBuyAndSaleStatistics', params)
const buyOrSalePrice = params => getAction('/depotItem/buyOrSalePrice', params)
//租户管理
const checkTenant = params => getAction('/tenant/checkIsNameExist', params)
const editTenant = params => putAction('/tenant/update', params)
//角色管理
const addRole = params => postAction('/role/add', params)
const editRole = params => putAction('/role/update', params)
const checkRole = params => getAction('/role/checkIsNameExist', params)
const roleAllList = params => getAction('/role/allList', params)
//用户管理
const registerUser = params => postAction('/user/registerUser', params)
const addUser = params => postAction('/user/addUser', params)
const editUser = params => putAction('/user/updateUser', params)
const getUserList = params => getAction('/user/getUserList', params)
// 采购订单
const getAllList = params => getAction('/address/getAllList', params)
// 审批管理
const approve = params => postAction('/workflowConfigProcess/approve', params)
//获取所有的用户
const getUserListNotTenant = params => getAction('/user/getUserListNotTenant', params)
const queryPermissionsByUser = params => postAction('/function/findMenuByPNumber', params)
//机构管理
const queryOrganizationTreeList = params => getAction('/organization/getOrganizationTree', params)
const queryOrganizationById = params => getAction('/organization/findById', params)
const checkOrganization = params => getAction('/organization/checkIsNameExist', params)
//经手人管理
const addPerson = params => postAction('/person/add', params)
const editPerson = params => putAction('/person/update', params)
const checkPerson = params => getAction('/person/checkIsNameExist', params)
const getPersonByType = params => getAction('/person/getPersonByType', params)
const getPersonByNumType = params => getAction('/person/getPersonByNumType', params)
// 运输公司管理
const addTransport = params => postAction('/transport/add', params)
const editTransport = params => putAction('/transport/update', params)
//账户管理
const addAccount = params => postAction('/account/add', params)
const editAccount = params => putAction('/account/update', params)
const checkAccount = params => getAction('/account/checkIsNameExist', params)
const getAccount = params => getAction('/account/getAccount', params)
//收支项目
const addInOutItem = params => postAction('/inOutItem/add', params)
const editInOutItem = params => putAction('/inOutItem/update', params)
const checkInOutItem = params => getAction('/inOutItem/checkIsNameExist', params)
const findInOutItemByParam = params => getAction('/inOutItem/findBySelect', params)
//仓库信息
const addDepot = params => postAction('/depot/add', params)
const editDepot = params => putAction('/depot/update', params)
const checkDepot = params => getAction('/depot/checkIsNameExist', params)
const generatorStockTake = params => postAction('/depotHead/generatorStockTake', params)

//商品属性
const editMaterialProperty = params => putAction('/materialProperty/update', params)
//客户类别
const queryUserCategoryTreeList = params => getAction('/userCategory/getUserCategoryTree', params)
const queryUserCategoryById = params => getAction('/userCategory/findById', params)
const checkUserCategory = params => getAction('/userCategory/checkIsNameExist', params)
//商品类型
const queryMaterialCategoryTreeList = params => getAction('/materialCategory/getMaterialCategoryTree', params)
const queryMaterialCategoryById = params => getAction('/materialCategory/findById', params)
const checkMaterialCategory = params => getAction('/materialCategory/checkIsCategoryNameExist', params)
//商品管理
const batchUpdatePrice = params => postAction('/material/batchUpdatePrice', params)
const addMaterial = params => postAction('/material/add', params)
const editMaterial = params => putAction('/material/update', params)
const checkMaterial = params => getAction('/material/checkIsExist', params)
const getMaterialBySelect = params => getAction('/material/findBySelect', params)
const getSerialMaterialBySelect = params => getAction('/material/getMaterialEnableSerialNumberList', params)
const getMaterialByBarCode = params => getAction('/material/getMaterialByBarCode', params)
const getMaterialByUnit = params => getAction('/material/getMaterialByUnit', params)
const getPriceByBarCode = params => getAction('/material/getPriceByBarCode', params)
const getDiscount = params => getAction('/promotionHead/getDiscount', params)
const getNumber = params => getAction('/promotionHead/getNumber', params)
const getSpecial = params => getAction('/promotionHead/getSpecial', params)

const checkMaterialNameIsExist = params => getAction('/material/checkMaterialNameIsExist', params)
const batchUpdateSalesPrice = params => postAction('/material/batchUpdateSalesPrice', params)
// 网络管理
const getNewJsonObject = params => getAction('/systemConfig/getNewJsonObject', params)
const getNewMaterial = params => getAction('/systemConfig/getNewMaterial', params)
const synchronizationMaterial = params => getAction('/systemConfig/getNewJsonObject', params)

// 附件接口管理
const getAttachmentListById = params => getAction('/attachment/getAttachmentListById', params)

const getMaxBarCode = params => getAction('/material/getMaxBarCode', params)
const checkMaterialBarCode = params => getAction('/materialsExtend/checkIsBarCodeExist', params)
const checkIsCodeExist = params => getAction('/materialsExtend/checkIsCodeExist', params)
const batchUpdateMaterial = params => postAction('/material/batchUpdate', params)
//序列号
const addSerialNumber = params => postAction('/serialNumber/add', params)
const editSerialNumber = params => putAction('/serialNumber/update', params)
const checkSerialNumber = params => getAction('/serialNumber/checkIsNameExist', params)
const batAddSerialNumber = params => postAction('/serialNumber/batAddSerialNumber', params)
const getEnableSerialNumberList = params => getAction('/serialNumber/getEnableSerialNumberList', params)
//多属性
const addMaterialAttribute = params => postAction('/materialAttribute/add', params)
const editMaterialAttribute = params => putAction('/materialAttribute/update', params)
const checkMaterialAttribute = params => getAction('/materialAttribute/checkIsNameExist', params)
const getAllMaterialAttribute = params => getAction('/materialAttribute/getAll', params)
//功能管理
const addFunction = params => postAction('/function/add', params)
const editFunction = params => putAction('/function/update', params)
const checkFunction = params => getAction('/function/checkIsNameExist', params)
//系统配置
const roleUpdate = params => putAction('/role/update', params)
const showPurchase = params => getAction('/role/showPurchase', params)
const addSystemConfig = params => postAction('/systemConfig/add', params)
const editSystemConfig = params => putAction('/systemConfig/update', params)
const checkSystemConfig = params => getAction('/systemConfig/checkIsNameExist', params)
const getCurrentSystemConfig = params => getAction('/systemConfig/getCurrentInfo', params)
const fileSizeLimit = params => getAction('/systemConfig/fileSizeLimit', params)
//平台参数
const addPlatformConfig = params => postAction('/platformConfig/add', params)
const editPlatformConfig = params => putAction('/platformConfig/update', params)
const getPlatformConfigByKey = params => getAction('/platformConfig/getPlatformConfigByKey', params)
//用户|角色|模块关系
const addUserBusiness = params => postAction('/userBusiness/add', params)
const editUserBusiness = params => putAction('/userBusiness/update', params)
const checkUserBusiness = params => getAction('/userBusiness/checkIsValueExist', params)
const checkIsConfigValueExist = params => getAction('/userBusiness/checkIsConfigValueExist', params)
const updateBtnStrByRoleId = params => postAction('/userBusiness/updateBtnStr', params)
//计量单位
const addUnit = params => postAction('/unit/add', params)
const editUnit = params => putAction('/unit/update', params)
const checkUnit = params => getAction('/unit/checkIsNameExist', params)
//供应商|客户|会员
const addSupplier = params => postAction('/supplier/add', params)
const editSupplier = params => putAction('/supplier/update', params)
const checkSupplier = params => getAction('/supplier/checkIsNameAndTypeExist', params)
const findBySelectSup = params => postAction('/supplier/findBySelect_sup', params)
const findBySelectCus = params => postAction('/supplier/findBySelect_cus', params)
const findBySelectNotTenantCus = params => postAction('/supplier/findBySelectNotTenant_cus', params)
const findBySelectRetail = params => postAction('/supplier/findBySelect_retail', params)
const findBySelectOrgan = params => postAction('/supplier/findBySelect_organ', params)
//单据相关
const findBillDetailByNumber = params => getAction('/depotHead/getDetailByNumber', params)
const findStockByDepotAndBarCode = params => getAction('/depotItem/findStockByDepotAndBarCode', params)
const findStockByMeIds = params => getAction('/depotHead/findStockByMeIds', params)

const getBatchNumberList = params => getAction('/depotItem/getBatchNumberList', params)
const findFinancialDetailByNumber = params => getAction('/accountHead/getDetailByNumber', params)
const getDetailByTransportNo = params => getAction('/accountHead/getDetailByTransportNo', params) //根据运输公司编号查询单据信息
const getDetailListByTime = params => getAction('/dailyItem/getDetailListByTime', params) 
const getDailyHeadList = params => getAction('/dailyHead/list', params) 

//流程配置
const addWorkflowConfigMain = params => postAction('/workflowConfig/add', params)
const editWorkflowConfigMain = params => putAction('/workflowConfig/update', params)
const checkWorkflowConfigMain = params => getAction('/workflowConfig/checkIsNameExist', params)
const doSaveConfigUser = params => postAction('/workflowConfig/doSaveConfigUser', params)
// 反审核

const batchCounterAuditStatus = params => postAction('/depotHead/batchCounterAuditStatus', params)
// 采购管理
const gettTransportAllList = params => getAction('/transport/getAllList', params)
const getAccountInfo = params => getAction('/supplier/info', params)
// 租户列表
const getTenantList = params => getAction('/tenant/getAllList', params)
// 审核进度
const getProgressByDefaultNumber = params => getAction('/workflowConfigProcess/getProgressByDefaultNumber', params)
const findRebateDetail = params => getAction('/depotItem/findRebateDetail', params)
const findSalesMarginList = params => getAction('/depoetHead/findSalesMarginList', params)
const findSalesMarginDetail = params => getAction('/depoetHead/findSalesMarginDetail', params)
// 根据订单获取仓库
const getTenantIdByDepotId = params => getAction('/depotHead/getTenantIdByDepotId', params)
const getUserListByTenantId = params => getAction('/user/getUserListByTenantId', params)
const addPrintHistory = params => postAction('/printHistory/AddPrintHistory', params)
const findBySubType = params => getAction('/function/findBySubType', params)
const findDepositWithPaymentById = params => getAction('/depotHead/findDepositWithPaymentById', params)


export {
  batchUpdatePrice,
  checkMaterialNameIsExist,
  batchUpdateSalesPrice,
  roleUpdate,
  showPurchase,
  getNewJsonObject,
  getNewMaterial,
  synchronizationMaterial,
  approve,
  getAttachmentListById,
  getNumber,
  getDiscount,
  getMaterialByUnit,
  getPriceByBarCode,
  queryUserCategoryTreeList,
  queryUserCategoryById,
  checkUserCategory,
  getBuyAndSaleStatistics,
  buyOrSalePrice,
  checkTenant,
  editTenant,
  addRole,
  editRole,
  checkRole,
  roleAllList,
  registerUser,
  addUser,
  editUser,
  getUserList,
  getUserListNotTenant,
  getAllList,
  queryPermissionsByUser,
  queryOrganizationTreeList,
  queryOrganizationById,
  checkOrganization,
  addPerson,
  editPerson,
  checkPerson,
  getPersonByType,
  getPersonByNumType,
  addAccount,
  editAccount,
  checkAccount,
  getAccount,
  addInOutItem,
  editInOutItem,
  checkInOutItem,
  findInOutItemByParam,
  addDepot,
  editDepot,
  checkDepot,
  editMaterialProperty,
  queryMaterialCategoryTreeList,
  queryMaterialCategoryById,
  checkMaterialCategory,
  addMaterial,
  editMaterial,
  checkMaterial,
  getMaterialBySelect,
  getSerialMaterialBySelect,
  getMaterialByBarCode,
  getMaxBarCode,
  checkIsCodeExist,
  checkMaterialBarCode,
  batchUpdateMaterial,
  addSerialNumber,
  editSerialNumber,
  checkSerialNumber,
  batAddSerialNumber,
  getEnableSerialNumberList,
  addMaterialAttribute,
  editMaterialAttribute,
  checkMaterialAttribute,
  getAllMaterialAttribute,
  addFunction,
  editFunction,
  checkFunction,
  addSystemConfig,
  editSystemConfig,
  checkSystemConfig,
  getCurrentSystemConfig,
  fileSizeLimit,
  addPlatformConfig,
  editPlatformConfig,
  getPlatformConfigByKey,
  addUserBusiness,
  editUserBusiness,
  checkUserBusiness,
  checkIsConfigValueExist,
  updateBtnStrByRoleId,
  addUnit,
  editUnit,
  checkUnit,
  addSupplier,
  editSupplier,
  checkSupplier,
  findBySelectSup,
  findBySelectCus,
  findBySelectNotTenantCus,
  findBySelectRetail,
  findBySelectOrgan,
  findBillDetailByNumber,
  findStockByDepotAndBarCode,
  getBatchNumberList,
  findFinancialDetailByNumber,
  addWorkflowConfigMain,
  editWorkflowConfigMain,
  checkWorkflowConfigMain,
  doSaveConfigUser,
  gettTransportAllList,
  getDetailByTransportNo,
  addTransport,
  editTransport,
  generatorStockTake,
  getDetailListByTime,
  getDailyHeadList,
  batchCounterAuditStatus,
  getAccountInfo,
  getTenantList,
  getProgressByDefaultNumber,
  findRebateDetail,
  findSalesMarginList,
  findSalesMarginDetail,
  getTenantIdByDepotId,
  getSpecial,
  getUserListByTenantId,
  addPrintHistory,
  findBySubType,
  findStockByMeIds,
  findDepositWithPaymentById
}
